{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/components/UserProfile/index.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { Avatar, Name, UserStatus } from \"../index\";\nimport { getUserName } from \"../../utils/User\";\nimport './UserProfile.scss';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst UserProfile = props => {\n  _s();\n  const [contents, setContents] = React.useState({\n    items: []\n  });\n  React.useEffect(() => {\n    if (props.profile.content) {\n      setContents({\n        ...contents,\n        ...props.profile.content\n      });\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [props]);\n  return /*#__PURE__*/_jsxDEV(\"div\", {\n    className: \"profile\",\n    children: [/*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"profile__header\",\n      children: /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"profile__header-wrapper\",\n        children: [/*#__PURE__*/_jsxDEV(Avatar, {\n          contentList: contents,\n          alt: getUserName(props.profile),\n          stringForFirstCharacter: getUserName(props.profile),\n          stringForGenerateColor: props.profile.id,\n          shortAvatar: false,\n          selfProfile: props.selfProfile\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 27,\n          columnNumber: 21\n        }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__header-infoName\",\n          children: [/*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"profile__header-infoName-wrap\",\n            children: [/*#__PURE__*/_jsxDEV(\"p\", {\n              children: \"\\u041F\\u043E\\u043B\\u044C\\u0437\\u043E\\u0432\\u0430\\u0442\\u0435\\u043B\\u044C: \"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 37,\n              columnNumber: 29\n            }, this), /*#__PURE__*/_jsxDEV(Name, {\n              user: props.profile\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 38,\n              columnNumber: 29\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 36,\n            columnNumber: 25\n          }, this), /*#__PURE__*/_jsxDEV(UserStatus, {\n            status: true\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 40,\n            columnNumber: 25\n          }, this)]\n        }, void 0, true, {\n          fileName: _jsxFileName,\n          lineNumber: 35,\n          columnNumber: 21\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 26,\n        columnNumber: 17\n      }, this)\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 25,\n      columnNumber: 13\n    }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n      className: \"profile__body\",\n      children: /*#__PURE__*/_jsxDEV(\"div\", {\n        className: \"profile__body-profile\",\n        children: [(props.profile.hideEmail === false || props.profile.hideEmail === undefined) && /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__body-profile-field\",\n          children: /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"profile__body-profile-field-wrapper\",\n            children: [/*#__PURE__*/_jsxDEV(\"span\", {\n              children: \"Email:\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 51,\n              columnNumber: 33\n            }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n              className: \"profile__body-profile-field-bold\",\n              children: props.profile.email\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 52,\n              columnNumber: 33\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 50,\n            columnNumber: 29\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 49,\n          columnNumber: 25\n        }, this) || /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__body-profile-field--green\",\n          children: /*#__PURE__*/_jsxDEV(\"span\", {\n            className: \"profile__body-profile-field--green\",\n            children: \"Email \\u0431\\u044B\\u043B \\u0441\\u043A\\u0440\\u044B\\u0442\"\n          }, void 0, false, {\n            fileName: _jsxFileName,\n            lineNumber: 57,\n            columnNumber: 29\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 56,\n          columnNumber: 25\n        }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__body-profile-field\",\n          children: /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"profile__body-profile-field-wrapper\",\n            children: [/*#__PURE__*/_jsxDEV(\"span\", {\n              children: \"Nickname:\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 62,\n              columnNumber: 29\n            }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n              className: \"profile__body-profile-field-bold\",\n              children: props.profile.nickname\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 63,\n              columnNumber: 29\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 61,\n            columnNumber: 25\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 60,\n          columnNumber: 21\n        }, this), props.profile.firstName && /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__body-profile-field\",\n          children: /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"profile__body-profile-field-wrapper\",\n            children: [/*#__PURE__*/_jsxDEV(\"span\", {\n              children: \"\\u0418\\u043C\\u044F:\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 69,\n              columnNumber: 33\n            }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n              className: \"profile__body-profile-field-bold\",\n              children: props.profile.firstName\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 70,\n              columnNumber: 33\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 68,\n            columnNumber: 29\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 67,\n          columnNumber: 25\n        }, this), props.profile.lastName && /*#__PURE__*/_jsxDEV(\"div\", {\n          className: \"profile__body-profile-field\",\n          children: /*#__PURE__*/_jsxDEV(\"div\", {\n            className: \"profile__body-profile-field-wrapper\",\n            children: [/*#__PURE__*/_jsxDEV(\"span\", {\n              children: \"\\u0424\\u0430\\u043C\\u0438\\u043B\\u0438\\u044F:\"\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 77,\n              columnNumber: 33\n            }, this), /*#__PURE__*/_jsxDEV(\"span\", {\n              className: \"profile__body-profile-field-bold\",\n              children: props.profile.lastName\n            }, void 0, false, {\n              fileName: _jsxFileName,\n              lineNumber: 78,\n              columnNumber: 33\n            }, this)]\n          }, void 0, true, {\n            fileName: _jsxFileName,\n            lineNumber: 76,\n            columnNumber: 29\n          }, this)\n        }, void 0, false, {\n          fileName: _jsxFileName,\n          lineNumber: 75,\n          columnNumber: 25\n        }, this)]\n      }, void 0, true, {\n        fileName: _jsxFileName,\n        lineNumber: 45,\n        columnNumber: 17\n      }, this)\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 44,\n      columnNumber: 13\n    }, this)]\n  }, void 0, true, {\n    fileName: _jsxFileName,\n    lineNumber: 24,\n    columnNumber: 9\n  }, this);\n};\n_s(UserProfile, \"WXmCywkNO0iHxbtIhj+7KBt12hU=\");\n_c = UserProfile;\nexport default UserProfile;\nvar _c;\n$RefreshReg$(_c, \"UserProfile\");","map":{"version":3,"names":["React","Avatar","Name","UserStatus","getUserName","UserProfile","props","contents","setContents","useState","items","useEffect","profile","content","id","selfProfile","hideEmail","undefined","email","nickname","firstName","lastName"],"sources":["/data/messenger.client/src/components/UserProfile/index.tsx"],"sourcesContent":["import React from \"react\";\nimport {UserProfileProps} from \"../../models/props/UserProfileProps\";\nimport {Avatar, Name, UserStatus} from \"../index\";\nimport {getUserName} from \"../../utils/User\";\nimport {ContentListResponse} from \"../../models/response/ContentListResponse\";\nimport './UserProfile.scss';\n\nconst UserProfile: React.FC<UserProfileProps> = (props) => {\n    const [contents, setContents] = React.useState<ContentListResponse>({items: []});\n\n    React.useEffect(() => {\n        if (props.profile.content) {\n            setContents(\n                {\n                    ...contents,\n                    ...props.profile.content\n                }\n            );\n        }\n        // eslint-disable-next-line react-hooks/exhaustive-deps\n    }, [props]);\n\n    return (\n        <div className=\"profile\">\n            <div className=\"profile__header\">\n                <div className=\"profile__header-wrapper\">\n                    <Avatar\n                        contentList={contents}\n                        alt={getUserName(props.profile)}\n                        stringForFirstCharacter={getUserName(props.profile)}\n                        stringForGenerateColor={props.profile.id}\n                        shortAvatar={false}\n                        selfProfile={props.selfProfile}\n                    />\n                    <div className=\"profile__header-infoName\">\n                        <div className=\"profile__header-infoName-wrap\">\n                            <p>Пользователь: </p>\n                            <Name user={props.profile} />\n                        </div>\n                        <UserStatus status={true} />\n                    </div>\n                </div>\n            </div>\n            <div className=\"profile__body\">\n                <div className=\"profile__body-profile\">\n                    {\n                        ((props.profile.hideEmail === false ||\n                        props.profile.hideEmail === undefined) &&\n                        <div className=\"profile__body-profile-field\">\n                            <div className=\"profile__body-profile-field-wrapper\">\n                                <span>Email:</span>\n                                <span className=\"profile__body-profile-field-bold\">{props.profile.email}</span>\n                            </div>\n                        </div>\n                        ) ||\n                        <div className=\"profile__body-profile-field--green\">\n                            <span className=\"profile__body-profile-field--green\">Email был скрыт</span>\n                        </div>\n                    }\n                    <div className=\"profile__body-profile-field\">\n                        <div className=\"profile__body-profile-field-wrapper\">\n                            <span>Nickname:</span>\n                            <span className=\"profile__body-profile-field-bold\">{props.profile.nickname}</span>\n                        </div>\n                    </div>\n                    {(props.profile.firstName! &&\n                        <div className=\"profile__body-profile-field\">\n                            <div className=\"profile__body-profile-field-wrapper\">\n                                <span>Имя:</span>\n                                <span className=\"profile__body-profile-field-bold\">{props.profile.firstName}</span>\n                            </div>\n                        </div>\n                    )}\n                    {(props.profile.lastName! &&\n                        <div className=\"profile__body-profile-field\">\n                            <div className=\"profile__body-profile-field-wrapper\">\n                                <span>Фамилия:</span>\n                                <span className=\"profile__body-profile-field-bold\">{props.profile.lastName}</span>\n                            </div>\n                        </div>\n                    )}\n                </div>\n            </div>\n        </div>\n    );\n}\n\nexport default UserProfile;"],"mappings":";;AAAA,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